package com.contextor.magiccards.web.amf;

import com.contextor.magiccards.web.to.Response;
import com.contextor.magiccards.web.to.user.UserProfileTO;
import org.springframework.flex.remoting.RemotingDestination;
import org.springframework.stereotype.Service;

/**
 * User: Sergey
 * Date: 10.02.2011 21:55:33
 */
@Service
@RemotingDestination
public class AmfAuthenticationService extends BaseAmfService {

    public Response<UserProfileTO> trackUser(String uid, String userName) {
        logger.info("trackUser; uid={}", uid);
        try {
            return new Response<UserProfileTO>(authHandler.trackUser(uid, userName));
        } catch (Throwable e) {
            return onError(e);
        }
    }
}
